<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="../skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>

<link href="skin/modal.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="images/js/jqModal.js"></script>
<script type="text/javascript" src="{$M[url]}images/js/space.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">

    <div class="main"> 
    	
        
        {template 'header.html','space'} 
        
        sadf
        
        
        <div class="mod">
        	<div class="head">
            	投稿
            </div>
            <div class="body">
             {loop $contents $r}
            
                <p>
                 <a href="{url($r[url])}" target="_blank">{$r['title']}</a> 
                 <br/>{date('Y-m-d',$r[updatetime])}
                 <br/>{$r[description]} 
                    
                    {if $userid == $_userid && 1 != 1}
                    <br/>
                        <a href="?module=member&file=manage&action=preview&contentid={$r[contentid]}" class="button button-mini">预览</a> 
                        {if $status!=99}
                        <a href="?module=member&file=manage&action=edit&contentid={$r[contentid]}" class="button button-mini">修改</a>
                        <a href="javascript:if(confirm('确定要删除吗？')) location='?module=member&file=manage&action=delete&contentid={$r[contentid]}'" class="button button-mini">删除</a> 
                         
                        {/if}
                    {/if}
                
                </p>
             {/loop}
            </div>
        </div>
        
        <div class="mod">
        	<div class="head">
            	日志
            </div>
            <div class="body">
             {loop $blogs $r}
            
                <p>
                 <a href="{url($r[url])}" target="_blank">{$r['title']}</a> 
                 <br/>{date('Y-m-d',$r[updatetime])}
                 <br/>{$r[description]} 
                </p>
             {/loop}
            </div>
        </div>
        
        
        <div class="mod">
        	<div class="head">
            	喜欢的小组
            </div>
            <div class="body row">
             {loop $groups $r}
            
                <p class="span2">
                 <a href="{url($r[url])}" target="_blank"><img src="{php echo $r[thumb] ? thumb($r[thumb],100,100) : 'misc/nopic.gif'}"/></a><br/>
                 <a href="{url($r[url])}" target="_blank">{$r['title']}</a> 
                 <br/>{date('Y-m-d',$r[updatetime])}
                 <br/>{$r[description]} 
                </p>
             {/loop}
            </div>
        </div>
        
       
    </div>
    
    
    <div class="aside">
    
    	
    	<div class="mod">
        	<div class="body">
            	<div class="alert alert-heading">
        		<img class="thumbnail" src="{php echo avatar($userid) ? thumb(avatar($userid),148,148) : 'nopic.gif'}"/>
                <br/>
                <p><a class="button button-warning" href="./index.php?module=space&file=fans&action=add&userid={$userid}"><i class="icon-plus icon-white"></i>加关注</a> 
                <a class="button" href="{url("?module=message&action=send&userid=$userid")}"><i class="icon-envelope"></i>写短消息</a></p>
                <p>
                  用户名：<a href="{url("?module=member&action=view&userid=$userid")}">{$username}</a><br />
                  最后登录：{date('Y-m-d H:i', $lastlogintime)}
                </p>
        </div>
            </div>
        </div>
        
        
        <div class="mod">
        	<div class="head">最近访客</div>
            <ul class="body users">
            	
                {loop $visitors $k $v}
                    <li>
                    <a href="{url("?module=space&userid=$v[visitorid]")}">
                    <img src="{php echo avatar($v[visitorid]) ? thumb(avatar($v[visitorid]),48,48) : thumb('nopic.gif',48,48)}" 
                    alt="{$v[username]}"  target="_blank"/> 
                    </a> 
                    <br/><a href="{url("?module=space&userid=$v[visitorid]")}">{nickname($v[visitorid])}</a>
                    <br/><small>{date('Y-m-d H:i:s',$v[addtime])}</small>
                    </li>
                {/loop}
            </ul>
        </div>
        
        
            
        <div class="mod">
        	<div class="head">关注TA的粉丝</div>
            <ul class="body users">
            	
                {loop $fans $k $v}
                    <li>
                    <a href="{url("?module=space&userid=$v[userid]")}">
                    <img src="{php echo avatar($v[userid]) ? thumb(avatar($v[userid]),48,48) : thumb('nopic.gif',48,48)}" 
                    alt="{$v[username]}"  target="_blank"/> 
                    </a> 
                    <br/><a href="{url("?module=space&userid=$v[userid]")}">{$v[username]}</a>
                    </li>
                {/loop}
            </ul>
        </div>
        
        <div class="mod">
        	<div class="head">TA关注的人</div>
            <ul class="body users">
           
                {loop $follows $k $v}
                    <li>
                    <a href="{url("?module=space&userid=$v[userid]")}">
                    <img src="{php echo avatar($v[userid]) ? thumb(avatar($v[userid]),48,48) : thumb('nopic.gif',48,48)}" 
                    alt="{$v[username]}"  target="_blank"/>
                    </a>
                    <br/><a href="{url("?module=space&userid=$v[userid]")}">{$v[username]}</a>
                    </li>
                {/loop}
             
            </ul>
        </div>
         
        
        <div class="mod">
            <div class="head">永久地址</div>
            <div class="body">
                我主页的永久地址：{url("?module=space&userid=$userid")}
            </div>
        </div>
        
    </div>
    <br class="clear"/> 

</div>

{template 'footer.html'}